package com.dp.vo;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import org.apache.struts2.json.annotations.JSON;

@Entity
@Table(name = "t_magazinepackage")
public class TMagazinepackage implements Serializable {
	    private static final long serialVersionUID = 1L;
	    @Id
	    @GeneratedValue(strategy = GenerationType.IDENTITY)
	    @Basic(optional = false)
	    @Column(name = "id")
	    private Integer id;
	    @Column(name = "mname")                
	    private String mname;     
	    @Column(name = "mtype")
	    private Integer mtype;
	    @Column(name = "path")
	    private String path;          
	    @Column(name = "note")
	    private String note;   
	    @Column(name = "userid")
	    private String userid;  
	    @Column(name = "createdate")                             
		@Temporal(TemporalType.TIMESTAMP)
		private Date createdate;   
	   
	    public TMagazinepackage(){
	    	
	    }
	    
	    public TMagazinepackage(Integer id){
	    	this.id=id;
	    }
	    
		public Integer getId() {
			return id;
		}
		public void setId(Integer id) {
			this.id = id;
		}
		public String getMname() {
			return mname;
		}
		public void setMname(String mname) {
			this.mname = mname;
		}
		public Integer getMtype() {
			return mtype;
		}
		public void setMtype(Integer mtype) {
			this.mtype = mtype;
		}
		public String getPath() {
			return path;
		}
		public void setPath(String path) {
			this.path = path;
		}
		public String getNote() {
			return note;
		}
		public void setNote(String note) {
			this.note = note;
		}
		public String getUserid() {
			return userid;
		}
		public void setUserid(String userid) {
			this.userid = userid;
		}
		@JSON(format="yyyy-MM-dd HH:mm:ss")
		public Date getCreatedate() {
			return createdate;
		}
		public void setCreatedate(Date createdate) {
			this.createdate = createdate;
		}
		
		@Override
	    public int hashCode() {
	        int hash = 0;
	        hash += (id != null ? id.hashCode() : 0);
	        return hash;
	    }

	    @Override
	    public boolean equals(Object object) {
	        if (!(object instanceof TMagazinepackage)) {
	            return false;
	        }
	        TMagazinepackage other = (TMagazinepackage) object;
	        if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
	            return false;
	        }
	        return true;
	    }

	    @Override
	    public String toString() {
	        return "com.dp.vo.TMagazinepackage[id=" + id + "]";
	    }
}
